package ink.tiptop.dto.req.remote;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * 服务远程视图(ZjfServiceRemoteView)请求查询类
 *
 * @author zjf
 * @since 2020-07-22 08:45:34
 */
@Getter
@Setter
public class ScanZjfServiceRemoteViewRequest implements Serializable {
    private static final long serialVersionUID = 7596479335620751882L;

    /**
     * 关联服务器配置信息
     */
    @JsonProperty("SCAN_SERVER")
    @NotNull(message = "要扫描的服务器ID不能为空")
    private Integer serverId;
    /**
     * 描述
     */
    @JsonProperty("SCAN_PATH")
    @NotBlank(message = "要扫描的路径不能为空")
    @Pattern(regexp = "^(\\/.*)$"
            ,message = "扫描路径用绝对路径")
    private String scanPath;

    /**
     * 搜索凭证
     * 用于判断搜索到的位置确定为服务的一个凭证
     * 比如 META-INF conf bin 等,默认是 META-INF
     */
    @JsonProperty("SCAN_PROOF")
    @NotBlank(message = "扫描路径的搜索凭证不能为空")
    private String proof;


}